Skip to content

[pull] trunk from cli:trunk#86

Merged
pull[bot] merged 16 commits into
All-Blockchains:trunkfrom
cli:trunk
Sep 3, 2025
Merged

[pull] trunk from cli:trunk#86
pull[bot] merged 16 commits into
All-Blockchains:trunkfrom
cli:trunk

Conversation

@pull

@pull pull Bot commented Sep 3, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

luxass and others added 16 commits August 27, 2025 04:56
- Introduced `--ref` flag to narrow down cache deletion to a specific branch or PR reference.
- Updated command examples to include usage of `--ref`.
- Added validation to ensure `--ref` cannot be used with `--all` and must accompany a cache key/ID.
* Implemented test cases for handling the `--ref` flag in cache deletion commands.
* Added validation for using `--ref` with cache key and ID.
* Ensured proper error messages are returned for invalid usage of `--ref`.
* Clarified the description of the `--ref` flag to specify its purpose more accurately.
* Ensures users understand that it narrows down deletion by cache key and ref.
* Changed the error message from "--ref cannot be used without cache key/ID" to "must provide a cache key" for clarity.
* Updated corresponding test case to reflect the new error message.
* Replaced direct conversion of cache ID string to int with a dedicated `parseCacheID` function.
* Improved readability and maintainability of the `deleteCaches` function.
* Added validation to ensure that the `--ref` flag cannot be used when a cache ID is provided.
* Updated error message to include the reference when a cache is not found with the specified `--ref`.
* Ensure that the `--ref` flag cannot be used in conjunction with a cache ID.
* Update error handling to provide clear feedback when this condition is violated.
* Add tests to cover scenarios involving the `--ref` flag and cache ID.
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Also note that the API never returns HTTP 422 for invalid refs.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This bumps sigstore/rekor to v1.4.1 to get a vulnerability fix in the downstream go-chi/chi
feat: add support for `--ref` in `gh cache delete`
Bump sigstore/rekor to v1.4.1
@pull pull Bot locked and limited conversation to collaborators Sep 3, 2025
@pull pull Bot added the ⤵️ pull label Sep 3, 2025
@pull pull Bot temporarily deployed to cli-automation September 3, 2025 16:15 Inactive
@pull pull Bot merged commit e40170b into All-Blockchains:trunk Sep 3, 2025
12 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants